package network;

import java.util.Iterator;
import java.util.Vector;

public class Tools {

	
	
	public static Vector<Peer> peerVectorDeepClone(Vector<Peer> v){
		Vector<Peer> clone = new Vector<Peer>();
		Iterator<Peer> it = v.iterator();
		
		while(it.hasNext())
			clone.add(new Peer(it.next()));
		
		return clone;
	}
	
	public static Vector<Connection> connectionVectorDeepClone(Vector<Connection> v){
		Vector<Connection> clone = new Vector<Connection>();
		Iterator<Connection> it = v.iterator();
		
		while(it.hasNext())
			clone.add(new Connection(it.next()));
		
		return clone;
	}
}
